<?
function makenav($ctitle = "", $hidden = 0, $nav = array() , $target = '') {
        global $nc; // nav counter
        
        if ($hidden == 1) {
                $display = "style=\"display: none\""; 
                // $img = "plus";
                $img = "collapse";
        } else {
                // $img = "minus";
                $img = "expand";
        } 
        echo "
  <tr class=tbnav style=\"cursor: hand\" onClick=\"ToggleNode('nav_tr_$nc', 'nav_img_$nc')\">
    <td><img id=\"nav_img_$nc\" src=images/$img.gif align=absmiddle>$ctitle</td>
  </tr>
  <tr id=\"nav_tr_$nc\" $display>
    <td>
         <table width=\"100%\" cellpadding=\"0\" cellspacing=\"1\" border=\"0\">";
        foreach ($nav AS $title => $link) {
                echo "
                     <tr>
                        <td>	
                        &nbsp;&nbsp;&nbsp;&nbsp;<a href=\"$link\" class=\"leftmenu\" target=$target>$title</a>
                        </td>
                     </tr>";
        } 
        echo "
         </table>
    </td>
  </tr>";
        $nc++;
}
//class=firstalt onMouseOver=\"this.className='secondalt'\" onMouseOut=\"this.className='firstalt'\" 
?>
<script language=JavaScript type=text/javascript>
<!--
function ToggleNode(node, img){
	nodeObject = document.getElementById(node);
	imgObject = document.getElementById(img);
	if (nodeObject.style.display == '' || nodeObject.style.display == 'block') {
		nodeObject.style.display = 'none';
		imgObject.src = 'images/collapse.gif';
	} else {
		nodeObject.style.display = 'block';
		imgObject.src = 'images/expand.gif';
	}
}
-->
</script>
